package cn.kogee.service.impl;

import cn.kogee.domian.Student;
import cn.kogee.mapper.StudentMapper;
import cn.kogee.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StudentServiceImpl implements IStudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public void add(Student student) {
        studentMapper.save(student);
    }

    @Override
    public Student findById(Long id) {
        return studentMapper.loadById(id);
    }

    @Override
    public List<Student> findAll() {
        return studentMapper.loadAll();
    }
}
